/*************************************************************************
	> File Name: oj-177_alphabet_graph.c
	> Author: Wang Bo
	> Mail: 1276106221@qq.com
	> Created Time: 2020年10月27日 星期二 16时53分53秒
 ************************************************************************/

#include <stdio.h>
#include <string.h>

int main() {
    char buf[1000] = {0};
    scanf("%s", buf);
    printf("%s\n", buf);
    for (int i = 1; i < strlen(buf); ++i) {
        char *s = buf, *p = &buf[strlen(buf) - 2];
        char temp[1000] = {0};
        temp[0] = *(p++);
        temp[1] = *p;
        for (int j = 2; j < strlen(buf); ++j) {
            temp[j] = *(s++);
        }
        printf("%s\n", temp);
        strcpy(buf, temp);
    }
    return 0;
}
